package com.netease.nie.dao;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.netease.nie.mapper.ExchangeCodeMapper;
import com.netease.nie.model.ExchangeCode;

/**
 * 
 * @author wwbn3695
 * @createDate July 16th,2016
 *
 */
@Repository
public class ExchangeCodeDao {

	@Resource
	private ExchangeCodeMapper exchangeCodeMapper;
	
	public int registerExchangeCodeOwner(int exchangeCodeId, long userId, long exchangeTime, int customGoodsCode, int customGoodsId) throws Exception {
		return exchangeCodeMapper.registerExchangeCodeOwner(exchangeCodeId, userId, exchangeTime, customGoodsCode, customGoodsId);
	}	
	public Long forceQueryOwnerIdById(int exchangeCodeId) {
		return exchangeCodeMapper.forceQueryOwnerIdById(exchangeCodeId);
	}
	
	public ExchangeCode queryExchangeCodeById(int id) {
		return exchangeCodeMapper.queryExchangeCodeById(id);
	}
	
	public List<ExchangeCode> queryExchangeCodeByIds(List<Integer> ids) {
		return exchangeCodeMapper.queryExchangeCodeByIds(ids);
	}

}
